#!/usr/bin/env python3
# -*- coding:utf-8 -*-

f = open('test.log', 'r')

for line in f:
    if 'Third' in line:
        print("This is the third line")
    else:
        print(line)
f.close()